<?php

// No direct access
 
defined('_JEXEC') or die('Restricted access'); 

if($this->c_lang == 'eu-ES'){
	print("<h1>".$this->rsc->info_title.$this->lang->name_eu."</h1>");
}
else
	print("<h1>".$this->rsc->info_title.$this->lang->name_es."</h1>");
?>
<br/>
<br/>
<i><?php echo $this->rsc->info_text; ?></i>
<br/>
<br/>
<br/>
<p align="right"><a href="index.php?option=com_hizkuntzak&task=showLangDetails">&laquo; <?php print($this->rsc->volver)?></a></p>
<br/>
<form name="editWordsLang" method="post" enctype="multipart/form-data" action="index.php?option=com_hizkuntzak">
<input type="hidden" name="task" value="addWordsLang"/>
<input type="hidden" name="hlang" value="<?php echo($this->lang->iso_code); ?>" />
<table>
	<tr>
		<th><?php echo($this->rsc->word_word);?></th>
		<th><?php echo($this->rsc->word_spelling);?></th>
		<th><?php echo($this->rsc->word_pronoun);?></th>
		<th><?php echo($this->rsc->word_video);?></th>
		<th><?php echo($this->rsc->word_active);?></th>
	</tr>
	<?php 
		foreach($this->wordsLang as $word){
			echo("<tr>");
			if($this->c_lang == 'eu-ES'){
				echo("<td><strong><i>$word->word_eu</i></strong></td>");
			}
			else{
				echo("<td><strong><i>$word->word_es</i></strong></td>");
			}
			echo("<td><input name='w$word->idWord-s' value='$word->spelling'/></td>");
			echo("<td><input name='w$word->idWord-p' value='$word->pronoun'/></td>");
			echo("<td><input type='file' name='w$word->idWord-v' value='$word->videoPath'/>");
			if($word->videoPath != "" || $word->videoPath != null){
				echo("<i>".$this->rsc->video_already."</i>");
			}
			echo("<input type='hidden' name='w$word->idWord-vo' value='$word->videoPath'/></td>");
			if($word->active)
				echo("<td><input type='checkbox' name='w$word->idWord-a' checked='checked'/></td>");
			else
				echo("<td><input type='checkbox' name='w$word->idWord-a' /></td>");
			echo("</tr>");
		}
	?>
</table>
<br/>
<br/>
<p align="right"><a href="index.php?option=com_hizkuntzak&task=showLangDetails">&laquo; <?php print($this->rsc->volver)?></a></p>
<br/>
<input type="submit" value="<?php echo $this->rsc->save_changes; ?>" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false">
</form>
